import { isNoNullOrUndefind } from '@/utils/utils';
import store from '@/store';

export default [
    // {
    //     path:'*',
    //     redirect:'/'
    // },

    {
        path: '/',
        redirect: '/homepage'

    },
    {
        path: '/homepage',
        component: () => import('@/views/homepage'),
        meta: {
            title: '首页',
            keepAlive: true,
            pagemark: '/'
        }
    },
    {
        path: '/register',
        component: ()=>import( '@/views/register.vue'),
        meta: { title: '登录注册', pagemark: 'register', name: '登录注册' },
        beforeEnter: (to, from, next) => {
            console.log(store.customer)
            // ...
            if(isNoNullOrUndefind(store.customer)&&isNoNullOrUndefind(store.customer)){
                alert('你已登录')
                
            }else{
                
            }
            next();
        }
       
    }
]